地址校验

地址校验

POST/v1/open-api/address/validate

请求头部

标签必填说明
Api-KeyApi Key,请登录系统,在我的个人资料中找到
Api-SecretApi Secret,请登录系统,在我的个人资料中找到

Body请求参数

参数名类型必填说明
addresses[array]地址详情
city[string]城市
state_province_code[string]州代码
postal_code[string]邮编地址,最少为5位数
country_code[string]国家代码,目前只支持US
is_residential[boolean]是否是住宅地址,可以不填,不填默认为falseis commercial
curl -X POST  \
  'https://api.sandbox.shipber.com/v1/open-api/address/validate' \
  -H 'Content-Type:application/json' \
  -H 'Api-Key:2cn1wgmfidytin3jef3b' \
  -H 'Api-Secret:qRBYybjRch7BdTxO5NTyGUd6mBvowNbsjahnAnpdI-BXc5sCrRt15XGr-hc9oY7C' \
  -d '{
    "addresses": [
        "6925 Riverview Ave"
    ],
    "city": "Kansas City",
    "state_province_code": "KS",
    "postal_code": "66102",
    "country_code": "US"
}'
{
    "data": {
        "status": "Commercial",
        "original_address": {
            "postal_code": "66102",
            "country_code": "US",
            "state_province_code": "KS",
            "is_residential": false,
            "addresses": ["6925 Riverview Ave"],
            "city": "Kansas City",
            "address_classification": "Commercial"
        },
        "matched_address": {
            "postal_code": "66102",
            "country_code": "US",
            "state_province_code": "KS",
            "is_residential": false,
            "addresses": ["6925 Riverview Ave"],
            "city": "Kansas City",
            "address_classification": "Commercial"
        }
    },
    "status": ""
}